/* Copyright  2009
   @Author
   Richard Changde Yin            e-mail yinchangde@hotmail.com

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; version 2 of the License.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
   
/**
 * @filename: sql_udf.h
 */ 

#ifndef __SQL_UDF_H__
#define __SQL_UDF_H__

/* This file defines structures needed by udf functions */

#include <function/func.h>
#include <function/create.h>

#include <stdint.h>

enum Item_udftype {UDFTYPE_FUNCTION=1,
                   UDFTYPE_AGGREGATE};

Function_builder *find_udf(const char *name, uint32_t len=0);
void free_udf(Function_builder *udf);

//int sql_create_function(Session *session,Function_builder *udf);

#endif /* __SQL_UDF_H__ */
